package com.rc.saas.tenant.vo.hlht;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.rc.saas.tenant.model.elec.ElecStationPrice;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;

public class HlhtTenantOpenStationPriceVo extends ElecStationPrice {

    private Long openPriceId;

    private String openPriceAdjustType;

    private BigDecimal openPriceAdjustValue;

    @JsonFormat(pattern = "HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "HH:mm:ss")
    private Date openPriceBeginTime;
    @JsonFormat(pattern = "HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "HH:mm:ss")
    private Date openPriceEndTime;


    public String getOpenPriceBeginTime() {
        return formateTime(openPriceBeginTime);
    }

    public void setOpenPriceBeginTime(Date openPriceBeginTime) {
        this.openPriceBeginTime = openPriceBeginTime;
    }

    public String getOpenPriceEndTime() {
        return formateTime(openPriceEndTime);
    }

    public void setOpenPriceEndTime(Date openPriceEndTime) {
        this.openPriceEndTime = openPriceEndTime;
    }

    public Long getOpenPriceId() {
        return openPriceId;
    }

    public void setOpenPriceId(Long openPriceId) {
        this.openPriceId = openPriceId;
    }



    public static String formateTime(Date date) {
        SimpleDateFormat df=new SimpleDateFormat("HH:mm:ss");
        return df.format(date);
    }

    public String getOpenPriceAdjustType() {
        return openPriceAdjustType;
    }

    public void setOpenPriceAdjustType(String openPriceAdjustType) {
        this.openPriceAdjustType = openPriceAdjustType;
    }

    public BigDecimal getOpenPriceAdjustValue() {
        return openPriceAdjustValue;
    }

    public void setOpenPriceAdjustValue(BigDecimal openPriceAdjustValue) {
        this.openPriceAdjustValue = openPriceAdjustValue;
    }
}
